package cn.glc.daily.life.infrastructure.repository.mysql;

import cn.glc.daily.life.infrastructure.dao.UserDao;
import cn.glc.daily.life.infrastructure.po.UserAuthsPo;
import cn.glc.daily.life.infrastructure.po.UserPo;
import cn.glc.daily.life.model.to.UserTo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Repository;

/**
 * 用户
 *
 * @author simon
 * @date 2020/9/27 15:58
 * @copyright:
 * @modifier
 * @motto a no talent, people who have to study hard
 */
@Repository
public class UserRepository extends ServiceImpl<UserDao, UserPo> implements IService<UserPo> {

    public UserTo findDetailsByUid(Long uid) {
        return super.baseMapper.findDetailsByUid(uid);
    }

    public UserAuthsPo findUserAuthsByUserName(String userName) {
        return super.baseMapper.findUserAuthsByUserName(userName);
    }

    public UserAuthsPo findUserAuthsByEmail(String userName) {
        return super.baseMapper.findUserAuthsByEmail(userName);
    }

    public Boolean accountClose(Long uid) {
        return super.baseMapper.accountClose(uid);
    }
}
